Page({
    data:{
        title:"你不是一个人",
        time:"2022-08-18",
        singer:"张信哲 / 薛之谦",
        url:"http://p1.music.126.net/LYjbauJ0VQBrkHhsl-TM0Q==/109951167790113435.jpg?param=120y120",
        list:[
            {
                id:1973067211,
                videoSrc:"http://link.hhtjim.com/163/1973067211.mp3",
                songname:"你不是一个人",
                name:"张信哲 / 薛之谦",
            }
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`,
          });
    }
})